//  Zaspe# - Attendance management
//  Copyright (C) 2006, 2007 Milton Pividori
//
//  This file is part of Zaspe#.
//
//  Zaspe# is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 3 of the License, or
//  (at your option) any later version.
//
//  Zaspe# is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with Zaspe#.  If not, see <http://www.gnu.org/licenses/>.

using System;
using Gentle.Framework;

namespace ZaspeSharp.Events
{
	[TableName("event_types")]
	public partial class EventType : Persistent
	{
		#region User variables
		[TableColumn("id", NotNull=true), PrimaryKey(AutoGenerated=true)]
		private int id;
		
		private string name;
		#endregion
		
		#region Constructors
		public EventType(string name) {
			this.name = name;
		}
		#endregion
		
#region Methods
		public override bool Equals (object o)
		{
			if (!(o is EventType))
				return false;
			
			EventType et = (EventType)o;
			
			if (this.id == et.id && this.name == et.name)
				return true;
			
			return false;
		}
#endregion
	}
}
